home *** CD-ROM | disk | FTP | other *** search
/ Adobe Graphics & Publishing SDK 1996 December / Adobe Graphics & Publishing SDK 1996 December.iso / pc / ps40sdk / examples / format / simpleformat / common / simpleformat.r < prev    next >
Encoding:
Text File  |  1996-11-08  |  4.8 KB  |  186 lines

  1. /*
  2.     File: SimpleFormat.r
  3.  
  4.     Copyright (c) 1993-6, Adobe Systems Incorporated.
  5.     All rights reserved.
  6.  
  7.     Rez file for SimpleFormat file format example module.
  8. */
  9.  
  10. /********************************************************************************/
  11. /* Defines required by included files */
  12.  
  13. #define plugInName            "SimpleFormat"
  14. #define VersionString        "4.0"
  15.  
  16. /********************************************************************************/
  17.  
  18. #if Macintosh
  19. #include "Types.r"
  20. #include "Systypes.r"
  21. #include "PIGeneral.r"
  22. #include "PIUtilities.r"
  23. #include "DialogUtilities.r"
  24. #endif
  25.  
  26. #if MSWindows
  27. #include "PIGeneral.h"
  28. #include "PIUtilities.r"
  29. #include "WinDialogUtils.r"
  30. #endif
  31.  
  32. #include "PIActions.h"
  33.  
  34. /*****************************************************************************/
  35.  
  36. #define plugInComment         "simpleformat example file format plug-in"
  37. #define vendorName            "AdobeSDK"
  38.  
  39. #define    ourSuiteID            'sdK4'
  40. #define ourClassID            'simP'
  41. #define ourEventID            typeNull // must be this
  42.  
  43. #define keyFoo                'fooB'
  44. #define keyBar                'barF'
  45.  
  46. /*****************************************************************************/
  47.  
  48. resource 'PiPL' (ResourceID, purgeable)
  49.     {
  50.         {
  51.         Kind { ImageFormat },
  52.         Name { plugInName },
  53.         Version { (latestFormatVersion << 16) | latestFormatSubVersion },
  54.  
  55.         #if Macintosh
  56.         Code68K { ImageFormat, $$ID },
  57.         CodePowerPC { 0, 0, "" },
  58.         #endif
  59.  
  60.         #if MSWindows
  61.         CodeWin32X86 { "ENTRYPOINT" },
  62.         #endif
  63.     
  64.         HasTerminology { ourClassID, ourEventID, ResourceID, "" },
  65.         /* class ID, event ID, aete ID, uniqueString */
  66.         
  67.         SupportedModes
  68.             {
  69.             doesSupportBitmap, doesSupportGrayScale,
  70.             doesSupportIndexedColor, doesSupportRGBColor,
  71.             doesSupportCMYKColor, doesSupportHSLColor,
  72.             doesSupportHSBColor, doesSupportMultichannel,
  73.             doesSupportDuotone, doesSupportLABColor
  74.             },
  75.             
  76.         EnableInfo { "true" },
  77.     
  78.         FmtFileType { '8B1F', '8BIM' },
  79.         ReadTypes { { '8B1F', '    ' } },
  80.         ReadExtensions { { 'SME ' } },
  81.         WriteExtensions { { 'SME ' } }, 
  82.         FormatFlags { fmtSavesImageResources, fmtCanRead, fmtCanWrite, fmtCanWriteIfRead },
  83.         /* canRead, canWrite, canWriteIfRead, savesResources */
  84.         FormatMaxSize { { 32767, 32767 } },
  85.         FormatMaxChannels { {   1, 24, 24, 24, 24, 24, 
  86.                                24, 24, 24, 24, 24, 24 } }
  87.         }
  88.     };
  89.  
  90.  
  91. resource 'PiMI' (ResourceID, purgeable)
  92. {
  93.     latestFormatVersion,     /* Version, subVersion, and priority of the interface */
  94.     latestFormatSubVersion,
  95.     0,
  96.     supportsBitMap +
  97.     supportsGrayScale +
  98.     supportsIndexedColor +
  99.     supportsRGBColor +
  100.     supportsCMYKColor +
  101.     supportsHSLColor +
  102.     supportsHSBColor +
  103.     supportsMultichannel +
  104.     supportsDuotone +
  105.     supportsLABColor,            /* Supported Image Modes */
  106.     '    ',                        /* Required host */
  107.     
  108.     {
  109.         canRead,
  110.         cannotReadAll,
  111.         canWrite,
  112.         canWriteIfRead,
  113.         savesResources,
  114.         {  1, 16, 16, 16,        /* Maximum # of channels for each plug-in mode */
  115.           16, 16, 16, 16,
  116.           16, 16,  0,  0,
  117.            0,  0,  0,  0 },
  118.         32767,                /* Maximum rows allowed in document */
  119.         32767,                /* Maximum columns allowed in document */
  120.         '8B1F',                /* The file type if we create a file. */
  121.         '8BIM',                /* The creator type if we create a file. */
  122.         {                    /* The type-creator pairs supported. */
  123.             '8B1F', '    '
  124.         },
  125.         {                    /* The extensions supported. */
  126.         }
  127.     },
  128.     
  129. };
  130.  
  131. /* About String resource */
  132.  
  133. resource StringResource (AboutID, "About Text", purgeable)
  134. {
  135.     plugInName "\n\n"
  136.     "Version " VersionString " "
  137.     "Release " ReleaseString "\n"
  138.     "Copyright ⌐ 1992-6 Adobe Systems Incorporated.\n"
  139.     "All rights reserved.\n\n"
  140.     "A plug-in image format module that reads and writes "
  141.     "Simple Format files in Adobe Photoshop¿."
  142. };
  143.  
  144. /* scripting dictionary resource */
  145.  
  146. resource 'aete' (ResourceID, purgeable)
  147. {
  148.     1, 0, english, roman,                                    /* aete version and language specifiers */
  149.     {
  150.         vendorName,                                            /* vendor suite name */
  151.         "Adobe example plug-ins",                            /* optional description */
  152.         ourSuiteID,                                            /* suite ID */
  153.         1,                                                    /* suite code, must be 1 */
  154.         1,                                                    /* suite level, must be 1 */
  155.         {},                                                    /* structure for filters */
  156.         {                                                    /* non-filter plug-in class here */
  157.             vendorName " simpleFormat",                        /* unique class name */
  158.             ourClassID,                                        /* class ID, must be unique or Suite ID */
  159.             plugInName " plug-in",                            /* optional description */
  160.             {                                                /* define inheritance */
  161.                 "<Inheritance>",                            /* must be exactly this */
  162.                 keyInherits,                                /* must be keyInherits */
  163.                 classFormat,                                /* parent: Format, Import, Export */
  164.                 "parent class format",                        /* optional description */
  165.                 flagsSingleProperty,                        /* if properties, list below */
  166.                             
  167.                 "foo",
  168.                 keyFoo,
  169.                 typeBoolean,
  170.                 "foobar",
  171.                 flagsSingleProperty,
  172.                 
  173.                 "bar",
  174.                 keyBar,
  175.                 typeBoolean,
  176.                 "foobar",
  177.                 flagsSingleProperty
  178.                 /* no properties */
  179.             },
  180.             {}, /* elements (not supported) */
  181.             /* class descriptions */
  182.         },
  183.         {}, /* comparison ops (not supported) */
  184.         {}    /* any enumerations */
  185.     }
  186. };